model_bivariate <- lm(yes~condition*as.factor(SAMPTYPE), data=national_data_sheriff )
model_bivariate_robust <- coeftest(model_bivariate, vcov.=vcovHC(model_bivariate, type="HC1"))

#cluster
model_cluster <- lm(yes~condition*as.factor(SAMPTYPE)+factor(match_id), data=national_data_sheriff )

model_cluster_robust <- coeftest(model_cluster, vcov.=rddtools::vcovCluster(model_cluster, clusterVar=national_data_sheriff$match_id), cluster = national_data_sheriff$match_id) #[1:2,]





stargazer(model_bivariate,model_cluster,
		  type = "latex", 
		  se = gaze.coeft(list(model_bivariate_robust, model_cluster_robust, model_cluster_rank_robust,model_cluster_rank_tercile_robust)), 
		  omit = "match_id",
		  add.lines = list(c("Matched Pair FE", "No", "Yes")),
		  intercept.bottom = FALSE, 
		  keep.stat = c("rsq", "n"), 
		  digits=2, 
		  star.cutoffs = c(0.05, 0.01, 0.001),
		  dep.var.labels = "Agreed to Discuss Collaboration",
		  covariate.labels = c("Intercept", "Ranking Condition", "Numeric Rank", "Sheriff Department","Ranking Condition X Numeric Rank", "Ranking Condition X Sheriff Department", "Rank X Sheriff Department", "Ranking Condition X Rank X Sheriff Department" ), out="results/tablek1.tex")

